@extends('layouts.admin')
@section('styles')
    <link href="//cdn.bootcss.com/select2/4.0.1/css/select2.min.css" rel="stylesheet">
@endsection

@section('content')
    <h1 class="text-center" >电影归档</h1>

    <div class="row">
        {!! Form::open(['url'=>'/movie/selectedEpsToMovies','method'=>'post']) !!}
        <div class="col-md-6">
            @foreach($episodes as $episode)
                <div class="checkbox">
                    <label>
                        {!! Form::checkbox('epID[]',$episode->id, null) !!}
                        {{$episode->raw_name}}
                    </label>
                </div>
            @endforeach
        </div>
        <div class="col-md-6">
            {!! Form::select('movieId', $movieList , null , ['class' => 'form-control','id'=>'movieID']) !!}
        </div>

        {!! Form::submit('Submit', ['class' => 'form-control']) !!}
        {!! Form::close() !!}


    </div>
@endsection

@section('scripts')
        <script src="//cdn.bootcss.com/select2/4.0.1/js/select2.full.min.js"></script>
    <script>

        $('#movieID').select2({
            placeholder:'choose a tag',
        });
    </script>

@endsection
